package com.example.jetour_line.map.plugin;
import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.example.jetour_line.map.mapview.MarkerMap.MarkerMapView;

import java.util.ArrayList;
import java.util.Map;

import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.platform.PlatformView;

public class MyView implements PlatformView, MethodChannel.MethodCallHandler{
    MarkerMapView mapView ;
    Context context;
    public MyView(Context context, BinaryMessenger messenger, int id, Object obj) {
        this.context = context;
        mapView = new MarkerMapView(context,obj);
        MethodChannel methodChannel = new MethodChannel(messenger, "ahaTravel.com/mapInteraction");
        methodChannel.setMethodCallHandler(this);
    }

    @Override
    public View getView() {
        TextView textView = new TextView(context);
        textView.setText("android_ceshi");
        return mapView;
    }

    @Override
    public void dispose() {

    }

    @Override
    public void onMethodCall(MethodCall call, MethodChannel.Result result) {
        if(call.method.startsWith("baiduMap")){
//            this.baseFlutterView.flutterMethodCall(call.method,call.arguments);
        }
        result.success(null);
    }

}

